package com.jiuzhe.commercial.utils;

import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * 封装首选项
 */
public class RxUtil {
    public static Observable.Transformer schedulersTransformer() {
        return new Observable.Transformer() {
            public Object call(Object observable) {
                return ((Observable)observable).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread());
            }
        };
    }
}
